<HTML><HEAD><TITLE>tyo(+Stream, +Ascii)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">Character I/O</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>tyo(+Stream, +Ascii)</H1>
The character represented by the ascii integer Ascii is put onto the output
stream Stream in raw mode.


<DL>
<DT><EM>Stream</EM></DT>
<DD>Integer (stream number) or Atom (reserved or user-defined                symbolic stream name).
</DD>
<DT><EM>Ascii</EM></DT>
<DD>Integer.
</DD>
</DL>
<H2>Description</H2>
   Puts the character represented by the integer ASCII code Ascii (in the
   range 0 to 255) onto the output stream Stream in raw mode.

<P>
   If the stream is a terminal, the tyo/2 output goes directly to the
   stream, whereas the output from put/2 is buffered first, and is only
   output to the stream when the output is flushed (e.g.  explicitly using
   flush/1).

<P>
   If the stream is not a terminal, tyo/2 behaves like put/2.

<P>
   ASCII codes for the non-printable characters (i.e.  control characters)
   are also acceptable.

<P>

<H3>Modes and Determinism</H3><UL>
<LI>tyo(+, +) is det
</UL>
<H3>Exceptions</H3>
<DL>
<DT><EM>(4) instantiation fault </EM>
<DD>Stream is not instantiated.
<DT><EM>(4) instantiation fault </EM>
<DD>Ascii is not instantiated.
<DT><EM>(5) type error </EM>
<DD>Stream is neither an integer nor an atom.
<DT><EM>(5) type error </EM>
<DD>Ascii is instantiated, but not to an integer.
<DT><EM>(192) illegal stream mode </EM>
<DD>Stream is not an output stream.
<DT><EM>(193) illegal stream specification </EM>
<DD>Stream is an illegal stream specification.
</DL>
<H2>Examples</H2>
<PRE>
   Success:
      [eclipse]: set_stream(screen,output),
      &gt; tyo(screen,91),tyo(screen,97),
      &gt; tyo(screen,93).
      [a]
      yes.

      [eclipse]: put(screen, 0'a), tyo(screen, 0'b),
      &gt; put(screen, 0'c), tyo(screen, 0'd).
      bdac
      yes.

      [eclipse]: write(screen,i), tyo(screen, 0'h).
      hi
      yes.

Error:
      tyo(Stream,A).                (Error 4).
      tyo(output,a).                (Error 5).
      tyo(98.0,output).             (Error 5).
      tyo("string", A).             (Error 5).
      tyo(11,97).                   (Error 192).
      tyo(atom,97).                 (Error 193).



</PRE>
<H2>See Also</H2>
<A HREF="../../kernel/iochar/tyi-1.html">tyi / 1</A>, <A HREF="../../kernel/iochar/tyi-2.html">tyi / 2</A>, <A HREF="../../kernel/iochar/tyo-1.html">tyo / 1</A>
</BODY></HTML>
